{% extends "base.html" %}

{% block title %}
{{ object.name }} Administration
{% endblock %}

{% block content %}
{% load listfilters %}
{% load userfilters %}
{% if user.is_authenticated and user.is_active %}
	{% if user.is_staff or user|is_secretariat_member and object|in_list:user.secretariat_member.conferences %}
		{% block pagecontent %}{% endblock %}
	{% else %}
	<div class="ui-widget" style="width:400px; margin:50px auto;">	
		<div class="ui-state-error ui-corner-all no-javascript" style="padding: 0pt 0.7em; font-size: 14px;">
			<p>
			<span style="float: left; margin-right: 1em;" class="ui-icon ui-icon-alert"></span>
			You do not have access to this page. If you are a secretariat member for this conference, please contact a secretariat member to have access granted on your user account.
			</p>
		</div>
	</div>
	{% endif %}
{% else %}
<div style="text-align:center">
    <p>You must be logged in to view this page.</p>
    <p><a class="button" href="{% url django.contrib.auth.views.login %}?next={{ request.path }}">Login</a></p>
    <p><a class="button" href="/accounts/register/?next={{ request.path }}">Register</a></p>
</div>
{% endif %}
{% endblock %}
